import request from "@/utils/request";

//获取卡车
export function getTruckApi(params) {
  return request({
    method: "get",
    url: "/truckType/page",
    params,
  });
}

//添加车辆
export function postTruckApi(data) {
  return request({
    method: "post",
    url: "/truckType",
    data,
  });
}

//删除车辆
export function delTruckApi(id) {
  return request({
    method: "DELETE",
    url: `/truckType/${id}`,
  });
}

//获取车辆类型详情
export function getOneTruckApi(id) {
  return request({
    method: "get",
    url: `/truckType/${id}`,
  });
}

//更新车辆
export function putTruckApi(data) {
  return request({
    method: "put",
    url: `/truckType/${data.id}`,
    data,
  });
}

//获取车辆类型信息列表
export function getTruckListApi() {
  return request({
    method: "get",
    url: `/truckType/simple`,
  });
}